<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="orest.back.membermanage.RegisterUserHandler"%>
<%@page import="net.ssta.core.db.RecordSet"%>
<%@page import="net.ssta.core.db.Record"%>
<%@page import="net.ssta.core.web.HTMLGenerator"%>
<%@page import="orest.back.userneeds.UserNeedsHandler"%>
<%@page import="net.ssta.common.LoginUser"%>
<%@page import="orest.front.achieve.AchieveHandler"%>
<%
	String path = request.getContextPath();
    String flag=request.getParameter("flag");
    
     
    String userId=LoginUser.getUserId();
    
    Record r=RegisterUserHandler.getUserById(userId);

    UserNeedsHandler handler=new UserNeedsHandler();
    Record empty=new Record();
    empty.addData("OPTIONVALUE","");
    empty.addData("OPTIONNAME","请选择");
    empty.addData("PROVINCE_ID","");
    empty.addData("PROVINCE_NAME","请选择");
    RecordSet zdxx=new RecordSet();
    RecordSet province=new RecordSet();
    zdxx.add(empty);
    province.add(empty);
    	
    zdxx.add(AchieveHandler.getNewEnergyClassList());
    province.add(handler.getAllProvince());
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <META http-equiv=Content-Type content="text/html; charset=utf-8" />
    <META http-equiv=x-ua-compatible content=ie=7 />
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR />
    <link href="<%=path%>/common/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="<%=path%>/common/css/user.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
    <script type="text/javascript" src="<%=path %>/includes/Fvalidate/Fvalidate.js" ></script>
	<link type="text/css" rel="stylesheet" href="<%=path %>/includes/Fvalidate/style.css" />
	<script type="text/javascript" src="<%=path %>/includes/DatePicker/WdatePicker.js"></script>
 
<title>用户信息修改</title>
 
<script type="text/javascript">
 
$(document).ready(function()
{
	if("<%=flag%>"=="true"){
	    alert("修改成功!");
	}
});

function checkForm(){
   if(!$("#search").Fvalidate()){
    return false;
  }
   
   document.userFrom.submit();
   return true;
}   


</script>


<style>
body, html {
	margin:0;
	padding:0;
}
	.ctable{
		font-size:12px;
		cellPadding:0px;
		cellSpacing:0px;
		background-color:#F6F9FF;
		
		} 
 
		.ctable tr{
		height:24px; 
		} 
		.ctable tr td{ 
		border:0px;
		border-top:1px #99bbe8 solid; 
		border-right:1px #99bbe8 solid;
		padding:5px; 
		vertical-align:middle;
		}
</style>

 
 
 
</head>
<body>


<%@include file="../common/toplogin.jsp"%>    
<%@include file="../common/topbanner.jsp"%> 
<%@include file="../common/topmenu.jsp"%> 



<div id="contentmain">

<%@include file="include/baseConfig.jsp"%> 



 <div id="content_right">
      
       <jsp:include   page="./include/baseTop.jsp"    flush="true">   
		      <jsp:param    name="open"    value="1"    />   
		</jsp:include>
				


<form id="search" action="<%=path %>/register?method=modUser"  name="userFrom" method="post">
<input name="user_USERID" value="<%=r.getString("USERID","") %>" type="hidden"/>
<div class="multiEditPanel" style="border:0;padding:10px;width:90%;padding-left:20px;">
  <table cellpadding="0" align="center" cellspacing="0" border="0" class="ctable" width=90% style="border-left:1px solid #99bbe8;border-bottom:1px solid #99bbe8;border-right:0px solid red;text-align:left;">
    <tr >
      <td width="30%">用户名：</td>
      <td >
      	<input type="text"  maxlength="20" style="width:120px;" name="user_USERNAME" class="textInput"   id="userName"   value="<%=r.getString("LOGINNAME") %>" readonly/>
      </td>
     </tr>
     
     <tr >
      <td>性别：</td>
      <td>
	  	<input type="radio" value="男" name="user_SEX" <%="男".equals(r.getString("SEX","男"))?"checked":"" %>/>男
	  	<input type="radio" value="女" name="user_SEX"  <%="男".equals(r.getString("SEX","男"))?"":"checked" %>/>女
	  </td>
    </tr>
    
    
     <tr >
      <td>真实姓名：</td>
      <td>
	  	<input type="text" name="user_FULLNAME" class="textInput" style="width:120px;" value="<%=r.getString("FULLNAME","") %>"/>
	  </td>
    </tr>
    
        
     <tr >
      <td>Email：</td>
      <td>
	  	<input type="text"  maxlength="20" style="width:120px;" class="textInput" name="user_EMAIL" rule="email"  value="<%=r.getString("EMAIL","") %>" error="请输入正确的邮箱地址" label="Email"/>
	  </td>
    </tr>
    
        
        
     <tr >
      <td>出生年月：</td>
      <td>
	  	<input type="text"  maxlength="20" style="width:120px;" class="textInput" name="user_BIRTHDAY" value="<%=r.getString("BIRTHDAY","").length()>10?r.getString("BIRTHDAY","").substring(0,10):r.getString("BIRTHDAY","") %>" readonly  onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
	  </td>
    </tr>
    
    
         
    <tr >
      <td>所在行业：</td>
      <td> 
        <%=HTMLGenerator.getSelectElementHtml("name='user_INDUSTRY' style='width:180px;'",zdxx,"OPTIONVALUE","OPTIONNAME",r.getString("INDUSTRY",""))%>
	  </td>
    </tr>
    
    
    
     <tr >
      <td>工作单位：</td>
      <td>
	  	<input type="text"  maxlength="20" style="width:180px;" class="textInput"   name="user_WORKORG" value="<%=r.getString("WORKORG","") %>"/>
	  </td>
    </tr>
    
 
    
    
     <tr >
      <td>电话：</td>
      <td>
	  	<input type="text"  maxlength="20" style="width:180px;" class="textInput"   name="user_TELEPHONE" value="<%=r.getString("TELEPHONE","") %>"/>
	  </td>
    </tr>
    
    <tr >
      <td>所在省市：</td>
      <td> 
          <%=HTMLGenerator.getSelectElementHtml("name='user_PROVINCE' style='width:180px;'",province,"PROVINCE_ID","PROVINCE_NAME",r.getString("PROVINCE",""))%>
   	  </td>
    </tr>
    
     <tr >
      <td>会员类型：</td>
      <td>
	  	<input type="radio" value="0" name="user_MEMBERTYPE" <%="0".equals(r.getString("MEMBERTYPE",""))?"checked":"" %>/>个人
	  	<input type="radio" value="1" name="user_MEMBERTYPE" <%="1".equals(r.getString("MEMBERTYPE",""))?"checked":"" %>/>企业
	  </td>
    </tr>
    
  </table>
  <center>
   <input type="button" value="修改" onclick="checkForm();"/>
  </center>




 
 </div>
</form>
  </div>
 
 </div>
 
 <%@include file="../../common/bottom.jsp"%>    
</body> 
</html>